package com.demo.user;

import org.nature.framework.annotation.Id;
import org.nature.framework.annotation.Table;
import org.nature.framework.annotation.Type;
import org.nature.framework.core.NatureMap;
import org.nature.framework.enums.Strategy;
import org.nature.framework.enums.Types;
/**
 * 用户类
 * 
 * 1、实体类，无需GET/SET方法，只需声明数据库字段的名称<p>
 * 2、使用注解控制指定主键@id,支持ADDSELF（数据库自增长）、UUID（框架维护）、ASSIGN（程序员指定id）<p>
 * 3、@Type：按照JAVA语言的基本类型进行设定，无需考虑数据库的字段，还支持默认值，长度设定等，简单快捷<p>
 */
@Table(name = "tb_user")
public class User extends NatureMap {
	private static final long serialVersionUID = 1L;
	
	@Id(strategy = Strategy.ADDSELF)
	@Type(type = Types.INT)
	public static String id = "id";
	
	@Type(type = Types.INT,def="18")
	public static String age = "age";
	
	@Type
	public static String sex = "sex";
	
	@Type
	public static String name = "name";
	
	@Type
	public static String headpic="headpic";
	
	@Type
	public static String address = "address";
	

}
